package com.dong.ch07_set;

import com.dong.ch06_tree_bst.BST;

public class BSTSet<E extends Comparable<E>> implements Set<E> {
    BST<E> tree = new BST<>();
    @Override
    public void add(E e) {
        tree.add(e);
    }

    @Override
    public void remove(E e) {
        tree.deleteAny(e);
    }

    @Override
    public boolean contains(E e) {
        return tree.contains(e);
    }

    @Override
    public int getSize() {
        return tree.size();
    }

    @Override
    public boolean isEmpty() {
        return tree.isEmpty();
    }
}
